#include "user.h"

uint8_t TestData[16];
static uint32_t TestCnt;
static void TestClient_UartCB(void *pData)
{
	uint32_t Type = (uint32_t)pData;
	uint8_t Temp;
	if (Type == UART_RX_IRQ)
	{
		Temp = Uart_Rx(DTU_UART_ID);
	}
	else
	{

	}
}

static void TestClient_TOCB(void *pData)
{
	TestCnt++;
	memcpy(TestData, &TestCnt, 4);
	Uart_Tx(DTU_UART_ID, TestData, sizeof(TestData));
}

void TestClient_Init(void)
{
	Uart_Config(DTU_UART_ID, DTU_BR, TestClient_UartCB, 1);
	Timer_Start(CLIENT_TIMER, 1000, 1, TestClient_TOCB);
}
